package com.cms.recursoshumanos.facade;


import com.cms.recursoshumanos.constant.Constant;
import com.cms.recursoshumanos.handler.WServiceCall;
import com.cms.recursoshumanos.json.me.JSONParser;
import com.cms.recursoshumanos.json.object.JsonObjectGetMyUserDetails;

public class InfoUserActivityFacade
{
	
	private String strUsername, strPass;	

	public InfoUserActivityFacade(String strUsername, String strPass)
	{
		this.strUsername = strUsername;
		this.strPass = strPass;
	}
	
	public String enviarSolicitud()
	{
		 
		JSONParser jParser = new JSONParser();
		return setValores(jParser.
						getJSONFromUrl(
								Constant.URL_WEBSERVICE, 
								WServiceCall.getInstance().
								getUserInfo(strUsername, strPass)));

	}
	
	public String setValores(String strResult)
	{
		JsonObjectGetMyUserDetails.getInstance().fromJSON(strResult);
		return JsonObjectGetMyUserDetails.getInstance().getResult();
	}
}
